if __name__=="__main__":
    n=int(input().strip())
    for i in range(n):
        nums=int(input().strip())
        wheats=list(map(int,input().strip().split()))
        # print(wheats)
        no_dead=0
        for each in wheats:
            if each<=10:
                no_dead+=1
        print(no_dead)

